import request from './request.js';
let service = request.service;
let download = request.download;
export default {
    bzAllJy() {
        /**获取所有机型*/
        return service({
            url: `/adscm/operation/jqbzSettings/selectJyDrawType`,
            method: 'get'
        })
    },
    bzAllDrawingList(id,parentId) {
        /**部装根据机型获取对应图纸信息 */
        return service({
            url: `/adscm/operation/jqbzSettingsDraws/selectAll/${parentId}/${id}`,
            method: 'post'
        })
    },
    bzDrawingList(pid) {
        /**获取部件的图纸 */
        return service({
            url: `/adscm/operation/jqbzSettingsDraws/selectBybid/${pid}`,
            method: 'post'
        })
    },
    bzUpdataDrawing(data) {
        /**修改图纸配置 */
        return service({
            url: `/adscm/operation/jqbzSettingsDraws/insert`,
            method: 'post',
            data
        })
    },
    bzRemoveDrawing(id) {
         /**移除图纸 */
         return service({
             url: `/adscm/operation/jqbzSettingsDraws/delete/${id}`,
             method: 'post'
         })
    },
    //全部零件名称列表
    allSpareParts(id) {
        return service({
            url: `/adscm/operation/jqbzSettingsInput/selectAll/${id}`,
            method: 'post'
        })
    },
    zzInputMaterie(id) {
        /**获取总装所有物料*/
        return service({
            url: `/adscm/operation/jqzz/jqzzSettingInput/selectAll/${id}`,
            method: 'get'
        })
    },
    zzAllParts(id) {
          /**获取总装所有部件*/
          return service({
              url: `/adscm/operation/jqzz/jqzzSettingParts/selectAll/${id}`,
              method: 'get'
          })
      },
     zzAllDrawing(id, parentId) {
        /**根据机型获取总装所有图纸 */
        return service({
            url: `/adscm/operation/jqzz/jqzzSettingDraw/selectAll/${parentId}/${id}`,
            method: 'post'
        })
    },
    zzDrawingList(pid) {
        /**获取部装的图纸 */
        return service({
            url: `/adscm/operation/jqzz/jqzzSettingDraw/selectBybid/${pid}`,
            method: 'post'
        })
    },
    zzUpdataDrawing(data) {
        /**添加图纸配置 */
        return service({
            url: `/adscm/operation/jqzz/jqzzSettingDraw/insert`,
            method: 'post',
            data
        })
    },
    zzRemoveDrawing(id) {
        /**删除总装图纸 */
        return service({
            url: `/adscm/operation/jqzz/jqzzSettingDraw/delete/${id}`,
            method: 'post',
        })
    },
    materialList(data) {
        /**原料列表 */
        return service({
            url: `/adscm/operation/jqyl/jqylSettingMaterialCheck/selectBom`,
            method: 'post',
            data
        })
    },
    materialList(data) {
        /**原料列表 */
        return service({
            url: `/adscm/operation/jqyl/jqylSettingMaterialCheck/selectBom`,
            method: 'post',
            data
        })
    },
    jqPlanList(data) {
        /**获取机器生产计划列表 */
        return service({
            url: `/adscm/operation/cg/jqPlan/selectJqPlan`,
            method: 'post',
            data
        })
    },
    selectTaskPerformPerson() {
        /**获取部装工序任务执行人列表 */
        return service({
            url: `/adscm/operation/jqbzPartsassembly/selectTaskPerformPerson`,
            method: 'post'
        })
    },
     updateJqPlan(data) {
         /**添加任务负责人 */
         return service({
             url: `/adscm/operation/cg/jqPlan/update`,
             method: 'post',
             data
         })
     },
     approveJqPlan(id) {
         /**单个审核通过 */
         return service({
             url: `/adscm/operation/cg/jqPlan/approve/${id}`,
             method: 'post'
         })
     },
     approveJqPlanAll(data) {
        /**批量审核通过 */
        return service({
            url: `/adscm/operation/cg/jqPlan/approves`,
            method: 'post',
            data
        })
     },
     managersList() {
         /**总装获取任务负责人列表 */
         return service({
             url: `/adscm/operation/jqzzMachine/selectTaskPerformPerson`,
             method: 'post'
         })
     },
     materialTaskList(data){
        /**获取原料库任务列表 */
        return service({
            url: `/adscm/operation/jqylMaterial/selectjqylMaterial`,
            method: 'post',
            data
        })
     },
     allZzProcedureList() {
         return service({
             url: `/adscm/operation/jqzz/jqzzSetting/select`,
             method: 'post'
         })
     },
     materialDepositRecord(type,data){
          /** insert-新增出库记录 update-修改出库记录 jqylMaterialdetailToShylMaterial-转库*/
        return service({
            url: `/adscm/operation/jqylMaterialdetail/${type}`,
            method: 'post',
            data
        })
      },
    deleteMachineParts(id) {
        /**删除部装任务 */
         return service({
             url: `/adscm/operation/jqbzPartsassembly/delete/${id}`,
             method: 'post'
         })
    },
    bzPickingAllMaterial(tid) {
        /**部装任务一键领料 */
        return service({
            url: `/adscm/operation/jqbz/jqbzMaterial/approve/${tid}`,
            method: 'post'
        })
    },
    bzChangeCheckStatus(data){
        /**部装任务修改物料状态*/
        return service({
            url: `/adscm/operation/jqbz/jqbzMaterialList/update`,
            method: 'post',
            data
        })
    },
    zzPickingAllMaterial(tid) {
        /**总装装任务一键领取物料和部件 */
        return service({
            url: `/adscm/operation/jqzz/jqzzMaterial/approve/${tid}`,
            method: 'post'
        })
    },
    zzChangeCheckStatus(data) {
        /**总装任务修改物料状态*/
        return service({
            url: `/adscm/operation/jqzz/jqzzMaterialList/update`,
            method: 'post',
            data
        })
    },
    dbPickingAllMaterial(tid) {
        /**总装装任务一键领取物料和部件 */
        return service({
            url: `/adscm/operation/jqdb/jqdbMaterial/approve/${tid}`,
            method: 'post'
        })
    },
     dbChangeCheckStatus(data) {
         /**总装任务修改物料状态*/
         return service({
             url: `/adscm/operation/jqdb/jqdbMaterialList/update`,
             method: 'post',
             data
         })
     },
     createMacPlan(data){
        /**机器工序计划-一键创建机器生产计划 */
        return service({
            url: `/adscm/operation/cg/jqPlan/insert`,
            method: 'post',
            data
        })
     },
     getInputParts(id,data){
         /**部件领取 */
         return service({
             url: `/adscm/operation/jqzz/jqzzPartsMaterialList/queryMaterial/${id}`,
             method: 'get',
             params:data
         })
     },
     returnSupplierList(data){
         /**返回给供应商原料列表 */
         return service({
             url: `/adscm/operation/jqylMaterialdetailReback/select`,
             method: 'post',
             data
         })
     },
    updateReturnSupplier(data){
        /**返回给供应商原料修改*/
        return service({
            url: `/adscm/operation/jqylMaterialdetailReback/update`,
            method: 'post',
            data
        })
    }



}
